package com.rapida.net;

/**
 * Created by mm on 2015/1/7.
 */
public class Host {
	private String ip;
	private String name;

	public Host() {
	}

	public Host(String ip, String name) {
		this.ip = ip;
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public boolean equals(Object o) {
		Host h = (Host)o;
		return this.getName().equals(h.getName()) && this.getIp().equals(h.getIp());
	}

	@Override
	public String toString() {
		return name + ":" + ip;
	}
}
